package com.read.clients;

import com.read.resp.BaseResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName OrderClient
 * @Description TODO
 * @Author young
 * @Date 2022-11-07 16:04
 * @Version 1.0
 **/
//fallback 如果被调方出现异常(降级处理),执行fallback回调方法, 返回托底数据
@FeignClient(name = "reading-cloud-order",path = "/order",fallback = OrderClientsFallback.class)
public interface OrderClients {


//    @RequestMapping("/findUserPayOrder")
//    public BaseResp findUserPayOrder(@RequestBody BookReq bookReq, HttpServletRequest request);

    @RequestMapping("/getOrdersByUserId")
    public BaseResp getOrdersByUserId(HttpServletRequest request,String bookId);

}
